{% extends "base.html" %}
{% block head_title %}Experiment Summary - {{experiment}}{% endblock %}
{% block title %}Experiment Summary - {{experiment}}{% endblock %}
{% block scripts %}
<link rel="stylesheet" href="/static/js/thickbox/thickbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="/static/js/thickbox/thickbox.js"></script>
<script type="text/javascript">
	$(function() {
		$("#accordion").accordion({
			autoHeight: false
		});
	});
	</script>
{% endblock %}

{% block content %}
<div class id="accordion">
	<h3><a href="#">General</a></h3>
	<div id="General">
	<table>
	<tr><th>Date</th><td>{{ experiment.experiment_date}}</td></tr>
	<tr><th>Assay</th><td>{{ experiment.assay}}</td></tr>
	<tr><th>Experiment</th><td>{{ experiment.experiment}}</td></tr>
	{% for exp_protocol in exp_protocol %}
	<tr><th>Protocol</th><td>{{exp_protocol.protocol}}</td></tr>
	{% endfor %}
	</table>
	<h3>Notes</h3>
	<p>{{experiment.comments}}</p>
	</div>

	<h3><a href="#">Projects</a></h3>
	<div id="Projects">
	<h3>Projects:</h3>
	<ul>
	{% for project in experiment.project.all %}
	<li><a href="{{ project.get_absolute_url }}">{{project}}</a></li>
	{% endfor %}
	</ul>
	
	
	<ul>
	<h3>Subprojects</h3>
	<ul>
	{% for subproject in experiment.subproject.all %}
	<li><a href="{{ subproject.get_absolute_url }}">{{subproject}}</a></li>
	{% endfor %}
	</ul>
	</div>
	
	<h3><a href="#">Researchers</a></h3>	
	<div id="Researchers">
	<ul>
	<h3>Researcher: </h3>
	{% for researcher in experiment.researcher.all %}
	<li>{{researcher}}</li>
	{% endfor %}
	</ul>
	</div>
	
	<h3><a href="#">Proteins</a></h3>
	<div id="Proteins">
	<h3>Proteins:</h3> 
	 <ul>{% for protein in experiment.protein.all %}<li><a href="/{{protein.get_absolute_url}}">{{protein}}</a></li>{% endfor %}</ul>
	</div>

	<h3><a href="#">Results and Conclusions</a></h3>
	<div id="conclusions">
	<h4>Results</h4>	
	{% for result in experiment.result_set.all %}
	<p>{{ result.conclusions }}</p>
	{% if result.result_figure1 %}<a href="{{result.result_figure1.url}}" class="thickbox"><img class="figure" alt="Figure 1" src="{{result.result_figure1.url}}" width=200 /></a>{% endif %}
	{% if result.result_figure2 %}<a href="{{result.result_figure2.url}}" class="thickbox"><img class="figure" alt="Figure 2" src="{{result.result_figure2.url}}" width=200 /></a>{% endif %}
	{% endfor %}
	<p>Add new result <a href="/experimentdb/experiment/{{experiment.experimentID}}/result/new"><img src="/static/img/icons/add.png" width=25 alt="here"/></a></p></div>

	<h3><a href="#">Reagents</a></h3>
	<div id="reagents">
	<h4>Chemicals:</h4> 
		<ul>{% for chemical in experiment.chemicals.all %}
			<li><a href="/{{chemical.get_absolute_url}}">{{chemical}}</a></li>{% endfor %}
		</ul>

	<h4>Cell Lines:</h4> 
		<ul>{% for cell in experiment.cellline.all %}
			<li><a href="{{cell.get_absolute_url}}">{{cell}}</a></li>{% endfor %}
		</ul>
		
	<h4>Constructs:</h4> 
		<ul>{% for construct in experiment.constructs.all %}
			<li><a href="{{construct.get_absolute_url}}">{{construct}}</a></li>{% endfor %}
		</ul>

	<h4>Antibodies:</h4>
		<ul>{% for antibody in experiment.antibodies.all %}
		<li><a href="/{{antibody.get_absolute_url}}">{{antibody}}</a></li>{% endfor %}</ul>
		
	<h4>Primers:</h4>
		<ul>{% for primer in experiment.siRNA.all %}
		<li><a href="/{{primer.get_absolute_url}}">{{primer}}</a></li>{% endfor %}</ul>
		
	<h4>Strains:</h4>
		<ul>{% for strain in experiment.strain.all %}
		<li><a href="{{strain.get_absolute_url}}">{{strain|safe}}</a></li>{% endfor %}</ul>
	</div>

	<h3><a href="#">Raw Data Files</a></h3>
	<div id="files">
	{% for result in experiment.result_set.all %}
	<ul>
	{% if result.file1 %}<li><a href="{{result.file1.url}}">{{result.file1}}</a></li>{% endif %}
	{% if result.file2 %}<li><a href="{{result.file2.url}}">{{result.file2}}</a></li>{% endif %}
	{% if result.file3 %}<li><a href="{{result.file3.url}}">{{result.file3}}</a></li>{% endif %}
	{% if result.rawscan1 %}<li><a href="{{result.rawscan1.url}}">{{result.rawscan1}}</a></li>{% endif %}
	{% if result.rawscan2 %}<li><a href="{{result.rawscan2.url}}">{{result.rawscan2}}</a></li>{% endif %}
	{% if result.rawscan3 %}<li><a href="{{result.rawscan3.url}}">{{result.rawscan3}}</a></li>{% endif %}
	{% if result.rawscan4 %}<li><a href="{{result.rawscan4.url}}">{{result.rawscan4}}</a></li>{% endif %}
	{% if result.rawscan5 %}<li><a href="{{result.rawscan5.url}}">{{result.rawscan5}}</a></li>{% endif %}
	{% endfor %}
	</ul>
	</div>

{% with experiment as object %}
{% include "comment.html" %}
{% endwith %}
</div>
{% endblock %}
